<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManageUsers.aspx.cs" MasterPageFile="~/Site.master" Inherits="Hydra.Web.Administration.ManageUsers" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
        <div>
            Users Account Management</div>
        <p>
        </p>
        <b>- The total registered users is:
            <asp:Literal runat="server" ID="lblTotalUsers" /><br />
            - The total online users at this moment:
            <asp:Literal runat="server" ID="lblOnlineUsers" /></b>
        <p>
        </p>
        In order to display all users whose name begins with letter click on the link letter:
        <p>
        </p>
        <asp:Repeater runat="server" ID="rptAlphabetBar" OnItemCommand="rptAlphabetBar_ItemCommand">
            <ItemTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Container.DataItem %>'
                    CommandArgument='<%# Container.DataItem %>' />&nbsp;&nbsp;
            </ItemTemplate>
        </asp:Repeater>
        <p>
        </p>
        Use the below feature to search users by partial username or e-mail:
        <p>
        </p>
        <asp:DropDownList runat="server" ID="ddlUserSearchTypes">
            <asp:ListItem Text="UserName" Selected="true" />
            <asp:ListItem Text="E-mail" />
        </asp:DropDownList>
        contains
        <asp:TextBox runat="server" ID="txtSearchText" />
        <asp:Button runat="server" ID="btnSearch" Text="Search" OnClick="btnSearch_Click" />
        <asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="false" DataKeyNames="UserName"
            OnRowCreated="gvUsers_RowCreated" OnRowDeleting="gvUsers_RowDeleting">
            <Columns>
                <asp:BoundField HeaderText="UserName" DataField="UserName" />
                <asp:HyperLinkField HeaderText="E-mail" DataTextField="Email" DataNavigateUrlFormatString="mailto:{0}"
                    DataNavigateUrlFields="Email" />
                <asp:BoundField HeaderText="Created" DataField="CreationDate" DataFormatString="{0:MM/dd/yy h:mm tt}" />
                <asp:BoundField HeaderText="Last activity" DataField="LastActivityDate" DataFormatString="{0:MM/dd/yy h:mm tt}" />
                <asp:CheckBoxField HeaderText="Approved" DataField="IsApproved" HeaderStyle-HorizontalAlign="Center"
                    ItemStyle-HorizontalAlign="Center" />
                <asp:HyperLinkField Text="<img src='images/edit.gif' border='0' />" DataNavigateUrlFormatString="EditUsers.aspx?UserName={0}"
                    DataNavigateUrlFields="UserName" />
                <asp:ButtonField CommandName="Delete" ButtonType="Image" ImageUrl="~/Administration/images/delete.gif" />
            </Columns>
            <EmptyDataTemplate>
                No users found.</EmptyDataTemplate>
        </asp:GridView>
</asp:Content>